<!-- ZmDataRadio -->
<template>
  <zm-radio-group v-bind="$attrs" v-on="$listeners">
    <component :is="compType" :disabled="hasDisabled(item)" v-for="(item,index) in dataList" :key="index" :label="item[valueKey]+''">
      <slot v-bind="item">
      {{item[labelName]}}
      </slot>
    </component>
  </zm-radio-group>
</template>

<script>
import commonData from '../mixin/commonData'
export default {
  name: 'ZmDataRadio',
  mixins: [commonData],
  props: {
    isBtn: Boolean
  },
  computed: {
    compType () {
      return !this.isBtn ? 'el-radio' : 'el-radio-button'
    }
  },
  methods: {
  }

}

</script>
<style lang='scss' scoped>
</style>
